<?
    /* -*- Mode: PHP5; tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- */

    /*********************************************************
    *            --== itellico Net Architect ==--
    *
    * @author Kulikov Alexey <a.kulikov@gmail.com>
    * @version n/a
    * @since 30.04.2005
    * @copyright itellico.com 2005
    *
    *********************************************************/
    
    /***
    * Class clientNNodeInserat
    ****
    * This class represents an inserat
    ****
    * @package clientNodes
    * @author A Kulikov <a.kulikov@gmail.com>
    * @version n/a
    * @since 30.04.2005
    * @copyright itellico.com 2005
    ***/
    class clientNodeIsearchitem extends clientNode{
        
        /**
         * Process inputs
         * 
         * @return void 
         **/
        public function process(){
            //get the page data
            $pageData = $this->getPageData();
            
            //get listing data
            $data = $this->db->getRow("SELECT * FROM node_root WHERE id = ".$this->object);
            
            //merge the data ;)
            $data['intime']     = $pageData['created'];
            $data['expires']    = $pageData['expires'];
            $data['published']  = $pageData['published'];
            $data['title']      = $pageData['title'];
            
            //perform the search
            $_GET['search']     = $data['title'];
            $_GET['all']        = true;
            $breadCrumbs        = new breadcrumbs($this->db,$_CONFIG['server_root']);
            $mySearch           = new clientNodeSearch($this->db,$this->smarty,$this->log,$breadCrumbs);
            $mySearch->process();
            
            //nothing
            $this->smarty->assign('data',$data);
            
            
        }
        
        
        /**
         * set the action template to page.html
         * 
         * @return void
         **/
        public function setTemplate(){
            $this->setActionTemplate('inseratSearchitem.html');
        }
    }
?>